Ext.define('planner.view.toolbars.Trash', {
    extend: 'Ext.panel.Panel',
    alias : 'widget.Trash',
    width: 70,
    height: 100,            
    border: '0 0 0 0',
    title : 'Trash',
    layout: 'fit',
    autoShow: true,
    html: '<div class="trash"><img src=images/trash.png /></div>',
    listeners: {
        render: function(v) {
            var me = this;
            this.dropZone = new Ext.dd.DropZone(this.getEl(), {
                getTargetFromEvent: function(e) {
                    return e.getTarget('.trash');
                },
                onNodeDrop : function(target, dd, e, data) {
                    console.log('CommonDiagramm onNodeDrop type=' + data.blockData.get('name'));
                    if(data.blockData.self.getName() == 'planner.model.Jobs')
                        me.fireEvent('removeJob', me, data.blockData);
                    else if(data.blockData.self.getName() == 'planner.model.Users')
                        me.fireEvent('removeDeveloper', me, data.blockData);
                    return true;
                }
            });
        }
    }
});